﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace RioStudio.Website.View.Gallery
{
    public partial class Album : RioPage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (User.Identity.IsAuthenticated)
                {
                    lstAlbum.DataSource = tData.Instance.ExecuteReader<RioStudio.Website.Model.Gallery>("Proc_GetAllGallery");
                }
                else
                {
                    lstAlbum.DataSource = tData.Instance.ExecuteReader<RioStudio.Website.Model.Gallery>("Proc_GetAllGalleryByInactive", false);
                }
                
                lstAlbum.DataBind();
            }
        }
    }
}